Group
An object of class Group is a group file in the Users & Groups control panel window. The Finder can't recognize or create a group unless the Users & Groups control panel window is open.PROPERTIES
bounds
- The coordinates of the rectangle that bounds the content region of the item's icon.
Class: List of four integers (Bounding Rectangle data type). The first two integers specify the coordinates of the upper-left corner of the item's icon, and the last two integers specify the coordinates of the lower-right corner of the icon.
Modifiable? Yes
icon
- A bitmap of the item's icon.
Class: Icon family (data type defined by Finder)
Modifiable: Yeslabel index
- The number of the label currently selected for the item in the Label menu (None = 0).
Class: Integer
Modifiable: Yesname
- The group's name.
Class: String
Modifiable: Yesposition
- Two integers that specify the position of the upper-left corner of the group's icon.
Class: List of two integers (Point data type) that specify the coordinates of the upper-left corner of the group's icon
Modifiable? Yes
ELEMENT CLASSES
NoneCOMMANDS HANDLED
Clean Up, Close, Count, Data Size, Exists, Get, Make, Open, Select, Sort, UpdateDEFAULT VALUE CLASS RETURNED
A reference to a group or, if you use the plural formgroups
, a list of references.EXAMPLE
This script displays a dialog box requesting the name of the new group to create, then opens the control panel Users & Groups, creates the new group, and sets its name:
tell application "Finder" set response to display dialog ¬ "Name of new group:" default answer "" set newGroup to text returned of response set cPanels to control panel "Users & Groups" of ¬ control panels folder open cPanels make group at cPanels with properties {name: newGroup} end tell